// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.common.model.PageSearch;
import com.fowo.api.entity.InventoryFlows;
import com.fowo.api.model.inventory.flows.InventoryFlowsItemVo;
import com.fowo.api.model.inventory.flows.InventoryFlowsSearchParamPo;
import com.fowo.api.model.inventory.flows.InventoryFlowsVo;
import com.fowo.api.model.inventory.flows.InventoryFlowsWarehousePositionFlowParams;
import com.fowo.api.model.inventory.flows.InventoryFlowsWarehousePositionFlowResult;
import com.fowo.api.model.inventory.flows.InventoryFlowsWareroomFlowsParams;
import com.fowo.api.model.inventory.flows.InventoryFlowsWareroomFlowsResult;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface InventoryFlowsMapper extends BaseMapper<InventoryFlows> {
  Page<InventoryFlowsItemVo> pageSearch(
    @Param("page") Page page,
    @Param("search") InventoryFlowsSearchParamPo search
  );
  List<OptionItem<InventoryFlowsItemVo>> searchOptions(
    @Param("search") InventoryFlowsSearchParamPo search
  );
  List<InventoryFlowsItemVo> search(
    @Param("search") InventoryFlowsSearchParamPo search
  );
  Date searchLastUpdateTime(
    @Param("search") InventoryFlowsSearchParamPo search
  );
  /**
   * 搜索满足条件的所有记录的编号列表
   * @param search 搜索参数
   * @return 编号列表
   */
  List<Long> searchIds(@Param("search") InventoryFlowsSearchParamPo search);
  /**
   * 搜索满足条件的记录数量
   * @param search 搜索参数
   * @return 记录数量
   */
  Long searchCount(@Param("search") InventoryFlowsSearchParamPo search);
  Long getIdByDocumentType(@Param("documentType") String documentType);

  List<Long> getIdsByDocumentType(@Param("list") List<String> list);

  String getDocumentTypeById(@Param("id") Long id);

  List<Map<String, Object>> getDocumentTypeByIds(@Param("ids") List<Long> ids);
  InventoryFlowsVo selectVoById(@Param("id") Long id);
  /**
   * 仓库流水 总数
   */
  int WareroomFlowsTotal(
    @Param("params") InventoryFlowsWareroomFlowsParams params
  );
  /**
   * 仓库流水（分页）
   */
  Page<InventoryFlowsWareroomFlowsResult> wareroomFlowsPage(
    @Param("page") Page page,
    @Param("params") InventoryFlowsWareroomFlowsParams params
  );

  /**
   * 仓库流水合计
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  Map wareroomFlowsSummary(
    @Param("params") InventoryFlowsWareroomFlowsParams params
  );

  /**
   * 查询仓库下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> wareroomFlowswarehouseId();

  /**
   * 查询店铺下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> wareroomFlowsshopId();

  /**
   * 仓位流水 总数
   */
  int WarehousePositionFlowTotal(
    @Param("params") InventoryFlowsWarehousePositionFlowParams params
  );
  /**
   * 仓位流水（分页）
   */
  Page<InventoryFlowsWarehousePositionFlowResult> warehousePositionFlowPage(
    @Param("page") Page page,
    @Param("params") InventoryFlowsWarehousePositionFlowParams params
  );

  /**
   * 仓位流水合计
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  Map warehousePositionFlowSummary(
    @Param("params") InventoryFlowsWarehousePositionFlowParams params
  );

  /**
   * 查询仓库下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> warehousePositionFlowwarehouseId();

  /**
   * 查询店铺下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> warehousePositionFlowshopId();
}
